<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>

<div class="clearfix" id="main">
  <div id="content">
    <div class="user">
      <div class="box referral_box">
        <div class="box_top"></div>
        <div class="box_content clearfix">
          <div class="referrals">
            <div class="page_header">
              <h2>Refer Friends and Get $10 Groupon Bucks!</h2>
            </div>
            <div class="page_content">
              <h3>Get $10 in Groupon Bucks when someone you invite gets their first Groupon.  There's no limit on how much you can earn!</h3>
              <?php
			  if (Auth::instance()->logged_in('login'))
			  {
			  ?>
              <ul class="no_bullets share">
                <li> <img alt="Share" src="http://assets1.grouponcdn.com/images/groupon/icons/w41_share.png?6hG3M6xe">
                  <div class="share_input">
                    <p>Share your unique referral link</p>
					<input class="auto_select G_event E-Share_Link_ReferPage" id="user_referral_url" name="user_referral_url" type="text" value=<?php echo url::base()."invite/r/".Auth::instance()->get_user()->id; ?>>
                  </div>
                </li>
                <li> <a class="email plaxo_link G_event E-Share_PlaxoEmail_ReferPage w41-email" href="mailto:?body=Check%20out%20Groupon%27s%20daily%20deal%20-%20huge%20discounts%20on%20the%20coolest%20stuff%20in%20your%20city.%20http%3A%2F%2Fwww.groupon.com%2Fr%2Fuu27103962&amp;subject=I%20think%20you%20should%20get%20your%20Groupon">Mail it</a> <a class="email plaxo_link G_event E-Share_PlaxoEmail_ReferPage" href="mailto:?body=Check%20out%20Groupon%27s%20daily%20deal%20-%20huge%20discounts%20on%20the%20coolest%20stuff%20in%20your%20city.%20http%3A%2F%2Fwww.groupon.com%2Fr%2Fuu27103962&amp;subject=I%20think%20you%20should%20get%20your%20Groupon">Mail it</a> </li>
                <li> <a href="http://facebook.com/share.php?u=http://www.groupon.com/?utm_campaign=UserReferral&amp;utm_medium=facebook&amp;utm_source=uu27103962" class="share_url_with_facebook bitlify fb G_event E-Share_Facebook_ReferPage w41-fb" rel="skip_external">Share it on Facebook</a> <a href="http://facebook.com/share.php?u=http://www.groupon.com/?utm_campaign=UserReferral&amp;utm_medium=facebook&amp;utm_source=uu27103962" class="share_url_with_facebook bitlify fb G_event E-Share_Facebook_ReferPage" rel="skip_external">Share it on Facebook</a> </li>
                <li> <a href="http://twitter.com/share?url=http%3A%2F%2Fwww.groupon.com%2F%3Futm_campaign%3DUserReferral%26amp%3Butm_medium%3Dtwitter%26amp%3Butm_source%3Duu27103962&amp;text=Check%20out%20Groupon%27s%20daily%20deal%20-%20huge%20discounts%20on%20the%20coolest%20stuff%20in%20your%20city..." class="tw G_event E-Share_Twitter_ReferPage w41-tw">Tweet it</a> <a href="http://twitter.com/share?url=http%3A%2F%2Fwww.groupon.com%2F%3Futm_campaign%3DUserReferral%26amp%3Butm_medium%3Dtwitter%26amp%3Butm_source%3Duu27103962&amp;text=Check%20out%20Groupon%27s%20daily%20deal%20-%20huge%20discounts%20on%20the%20coolest%20stuff%20in%20your%20city..." class="tw G_event E-Share_Twitter_ReferPage">Tweet it</a> </li>
              </ul>
              <?php
			  }
			  else
			  {
			  ?>
              <p><a href="/login">登录</a> or <a href="/users/new">创建账号</a> to get your personal referral link.</p>
              <?php
			  }
			  ?>
            </div>
          </div>
        </div>
        <div class="box_bottom"></div>
      </div>
    </div>
  </div>
  <div id="rail">
    <div class="box">
      <div class="box_top"></div>
      <div class="box_content">
        <div class="page_content clearfix">
          <h5>Referral FAQ</h5>
          <ul class="collapsible_faq">
            <li>
              <h4 class="toggle_handle"> <a href="#">What is this?</a> </h4>
              <p class="toggle_content" style="display: none; ">We're giving $10 in Groupon Bucks for every friend you refer when they make their first purchase.  It's our way of saying "thanks" for spreading the word and increasing our collective buying power!  Groupon Bucks can be used toward any Groupon purchase, and they never expire.</p>
            </li>
            <li>
              <h4 class="toggle_handle"> <a href="#">How do I participate?</a> </h4>
              <p class="toggle_content" style="display: none; ">Share your personalized referral link using the tools to your left.  When someone clicks that link, we'll know you sent them.</p>
            </li>
            <li>
              <h4 class="toggle_handle"> <a href="#">What are the rules?</a> </h4>
              <p class="toggle_content" style="display: none; ">If someone joins Groupon within 72 hours after clicking your link, we'll notify you within 24 hours of their first purchase and automatically add $10 Groupon Bucks to your account.  You can refer as many people as you like. Check your balance by clicking <em>My Stuff &gt; My Account</em>.</p>
            </li>
          </ul>
        </div>
      </div>
      <div class="box_bottom"></div>
    </div>
  </div>
</div>

